var fs = require('fs')

function pReadFile(filePath){
	return new Promise(function(resolve, reject){
		fs.readFile(filePath, 'utf8', function(err, data){
			if (err) {
				reject(err)
			}else{
				resolve(data)
			}
		})
	})
}

pReadFile('./log/a.log')
	.then((data)=>{
		console.log(data)
		return pReadFile('./log/b.log')
	},(err)=>console.log(err))
	.then((data)=>{
		console.log(data)
		return pReadFile('./log/c.log')
	},(err)=>console.log(err))
	.then((data)=>console.log(data),(err)=>console.log(err))